home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / AppleShare IP SDK / ASIP Registry / Headers / AppleShareFileServerRegistry.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-21  |  13.7 KB  |  422 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        AppleShareFileServerRegistry.h
  3.  
  4.      Contains:    Registry records for file server.
  5.  
  6.      Version:    Technology:    AppleShare IP 6.0
  7.                  Release:    ASIP 6.2 SDK - Friday, April 2, 1999 9:36:27 AM
  8.  
  9.      Copyright:    © 1995-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __APPLESHAREFILESERVERREGISTRY__
  18. #define __APPLESHAREFILESERVERREGISTRY__
  19.  
  20. #ifndef __FILES__
  21. #include <Files.h>
  22. #endif
  23.  
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47. typedef unsigned char                     Str42[43];
  48. typedef unsigned char                     Str199[200];
  49. enum {
  50.     kFSCreatorSig                = FOUR_CHAR_CODE('ipwf')        /* Attribute Signature for FileServer Service object attributes*/
  51. };
  52.  
  53. enum {
  54.                                                                 /* Attribute Types for FileServer Service object each attribute */
  55.     kFSServerInfoType            = FOUR_CHAR_CODE('srvr'),        /* ServerInfo*/
  56.     kFSServerGreetingType        = FOUR_CHAR_CODE('gret'),
  57.     kFSCacheInfoType            = FOUR_CHAR_CODE('cach'),
  58.     kFSIdleUserInfoType            = FOUR_CHAR_CODE('idle'),
  59.     kFSAdminInfoType            = FOUR_CHAR_CODE('admm'),
  60.     kFSHTTPInfoType                = FOUR_CHAR_CODE('http'),
  61.     kFSHTTPFolderType            = FOUR_CHAR_CODE('hfol'),
  62.     kFSHTTPFileType                = FOUR_CHAR_CODE('hfil'),
  63.     kFSHTTPPluginType            = FOUR_CHAR_CODE('hplg'),
  64.     kFSMultiWebDirSig            = FOUR_CHAR_CODE('webd'),        /* Multi Domain signature */
  65.     kFSHTTPWebDirCountType        = FOUR_CHAR_CODE('domC'),
  66.     kFSHTTPWebDirType            = FOUR_CHAR_CODE('0000'),
  67.     kFSFTPInfoType                = FOUR_CHAR_CODE('ftp '),
  68.     kFSAFPInfoType                = FOUR_CHAR_CODE('afp '),
  69.     kFSSMBInfoType                = FOUR_CHAR_CODE('smb '),
  70.     kFSMimeType                    = FOUR_CHAR_CODE('mime'),
  71.     kFSIPFilterType                = FOUR_CHAR_CODE('filt'),
  72.     kFSMaxConnection            = FOUR_CHAR_CODE('maxc')        /* max concurrent connection */
  73. };
  74.  
  75. /* Service specific advanced options */
  76. enum {
  77.     kFSAFPTCPSig                = FOUR_CHAR_CODE('afpt'),        /* AFP over TCP port signature */
  78.     kFSSMBInfoSig                = FOUR_CHAR_CODE('smb '),        /* SMB over TCP port signature */
  79.     kFSHTTPInfoSig                = FOUR_CHAR_CODE('http'),        /* HTTP port signature */
  80.     kFSFTPInfoSig                = FOUR_CHAR_CODE('ftp ')        /* FTP port signature */
  81. };
  82.  
  83. enum {
  84.     kFSPortType                    = FOUR_CHAR_CODE('port'),        /* port number (UInt16) for all services */
  85.     kFSSessionTimeout            = FOUR_CHAR_CODE('ssto')        /* session timeouts for all services (SInt32) */
  86. };
  87.  
  88. enum {
  89.     kFSTransferTimeout            = FOUR_CHAR_CODE('trto'),        /* transfer timeout for kFSFTPInfoSig (SInt32) */
  90.     kFSKeepAliveTimeout            = FOUR_CHAR_CODE('kato'),        /* keep alive timeout for kFSHTTPInfoSig (SInt32) */
  91.     kFSCGITimeout                = FOUR_CHAR_CODE('cgto'),        /* CGI timeout for kFSHTTPInfoSig (SInt32) */
  92.     kFSLogSize                    = FOUR_CHAR_CODE('logs')        /* Log Size - for kFSHTTPInfoSig (UInt32) */
  93. };
  94.  
  95. /* UAM information... */
  96. enum {
  97.     kFSUAMInfoSig                = FOUR_CHAR_CODE('uam ')        /* Signature */
  98. };
  99.  
  100.  
  101. enum {
  102.     kFSNumUAMS                    = FOUR_CHAR_CODE('uamc'),        /* Number of UAMs (UInt32) */
  103.     kFSUAMNames                    = FOUR_CHAR_CODE('uams')        /* UAM names (buffer of packed pascal strings) */
  104. };
  105.  
  106. /*----------------------------------------------------------*/
  107. /*        Server Preference - General Information                */
  108. /*----------------------------------------------------------*/
  109. enum {
  110.     kFSServerInfoVersion        = 1
  111. };
  112.  
  113.  
  114.  
  115. struct ServerInfo {
  116.     SInt16                             versionNumber;                /* version number for this record */
  117.     SInt16                             fileServerVersion;            /* version# for file server */
  118.     SInt16                             userActivityLimit;            /* user activity limit in % */
  119.     SInt16                             maxLogin;                    /* maximum client connections */
  120.     SInt16                             maxGuestAccess;                /* maximum number of guest and anonymous logins */
  121.     SInt16                             shutdownMinutes;            /* minutes until shutdown */
  122. };
  123. typedef struct ServerInfo                ServerInfo;
  124. /*----------------------------------------------------------*/
  125. /*        Server Preference - connect info & Login Greeting    */
  126. /*----------------------------------------------------------*/
  127. enum {
  128.     kFSServerGreetingVersion    = 1
  129. };
  130.  
  131.  
  132. struct ServerGreeting {
  133.     SInt16                             versionNumber;                /* version number for this record */
  134.     Str199                             greetingMsg;                /* login greeting */
  135. };
  136. typedef struct ServerGreeting            ServerGreeting;
  137. /*----------------------------------------------------------*/
  138. /*        Server Preference - Additional Cache Information    */
  139. /*----------------------------------------------------------*/
  140. enum {
  141.     kFSCacheInfoVersion            = 1
  142. };
  143.  
  144.  
  145. struct CacheInfo {
  146.     SInt16                             versionNumber;                /* version number for this record */
  147.     SInt32                             cacheForOthers;                /* memory to be reserved for other applications */
  148. };
  149. typedef struct CacheInfo                CacheInfo;
  150. /*----------------------------------------------------------*/
  151. /*        Server Preference - Idle User Information            */
  152. /*----------------------------------------------------------*/
  153. /* idleFlag bits. */
  154. enum {
  155.     kFSIdleDisconEnabledMask    = 0x0001,                        /* allow to disconnect idle users */
  156.     kFSDisconExeptOpenFilesMask    = 0x0002,                        /* if true, disconnect except open file users */
  157.     kFSDisconSuperUserMask        = 0x0004,                        /* if true, isconnect idel super users */
  158.     kFSDisconNormalUserMask        = 0x0008,                        /* if true, disconnect idle normal users */
  159.     kFSDisconGuestUserMask        = 0x0010                        /* if true, disconnect idle guest users */
  160. };
  161.  
  162.  
  163. enum {
  164.     kFSIdleUserInfoVersion        = 1
  165. };
  166.  
  167.  
  168. struct IdleUserInfo {
  169.     SInt16                             versionNumber;                /* version number for this record */
  170.     SInt16                             idleFlag;                    /* see above */
  171.     SInt16                             idleMinute;                    /* max # of minute for idle users */
  172.     Str199                             disconnectMsg;                /* disconnect message */
  173. };
  174. typedef struct IdleUserInfo                IdleUserInfo;
  175. /*----------------------------------------------------------*/
  176. /*        Server Preference - Serial Miscelleneous Information*/
  177. /*----------------------------------------------------------*/
  178. enum {
  179.     kFSAdminInfoVersion            = 1
  180. };
  181.  
  182.  
  183. struct AdminInfo {
  184.     SInt16                             versionNumber;                /* version number for this record */
  185.     Str31                             namePhone;                    /* name & phone */
  186.     Str31                             organization;                /* organization */
  187. };
  188. typedef struct AdminInfo                AdminInfo;
  189. /*----------------------------------------------------------*/
  190. /*        Server Preference - HTTP Information                */
  191. /*----------------------------------------------------------*/
  192. /* Flag bits.     */
  193. enum {
  194.     kFSMultiDomainEnabled        = 0x0001,                        /* allow multi-domain support */
  195.     kFSDirListingEnabled        = 0x0002,                        /* allow directory listing */
  196.     kFSAutoShareWebFolder        = 0x0004                        /* if on, web folder share point at start up; server will clear */
  197. };
  198.  
  199. enum {
  200.     kFSHTTPServiceInfoVersion    = 2
  201. };
  202.  
  203. enum {
  204.     kFSHTTPEnable                = 1,                            /* enable HTTP*/
  205.     kFSHTTPLogEnable            = 1,                            /* enable HTTP Log*/
  206.     kFSHTTPGuestEnable            = 1                                /* guest turned on for HTTP*/
  207. };
  208.  
  209.  
  210. struct HTTPServiceInfo {
  211.     SInt16                             versionNumber;                /* version number for this record */
  212.     SInt16                             enabled;                    /* Enable HTTP, 1-enable, 0-not enable */
  213.     SInt16                             status;
  214.     SInt16                             logEnabled;                    /* Enable HTTP Log, 1-enable, 0-not enable */
  215.     SInt16                             maxConnect;                    /* HTTP maximum client connections */
  216.     SInt16                             guestEnabled;                /* Whether guest allowed for HTTP */
  217.     SInt32                             flag;                        /* new field for ASIP6 */
  218. };
  219. typedef struct HTTPServiceInfo            HTTPServiceInfo;
  220.  
  221. struct HTTPFolderRec {
  222.     SInt16                             vRefNum;                    /* HTML folder path vRefNum*/
  223.     Str27                             volumeName;                    /* HTML folder path volume name*/
  224.     UInt32                             volCreateDate;                /* HTML folder path volume creation date*/
  225.     SInt32                             dirID;                        /* HTML folder path DirID*/
  226. };
  227. typedef struct HTTPFolderRec            HTTPFolderRec;
  228.  
  229. struct HTTPFileRec {
  230.     Str255                             partialPath;                /* partial path to HTML file starting from the Web folder */
  231. };
  232. typedef struct HTTPFileRec                HTTPFileRec;
  233. enum {
  234.     kFSPlugInEnable                = 1,                            /* enable Plug-ins*/
  235.     kFSPlugInLoggingEnable        = 1                                /* enable Plug-in logging*/
  236. };
  237.  
  238.  
  239. struct HTTPPlugInsRec {
  240.     SInt16                             pluginEnable;                /* Plug-ins,  1-enable, 0-not enable */
  241.     SInt16                             loggingEnable;                /* Plug-in logging, 1-enable, 0-not enable */
  242.     SInt32                             memSize;                    /* Plug-in memory allocation */
  243.     FSSpec                             preProcessorSpec;            /* Preprocessor plugin spec */
  244.     FSSpec                             postProcessorSpec;            /* Postprocessor plugin spec */
  245.     FSSpec                             errorSpec;                    /* Error plugin spec */
  246. };
  247. typedef struct HTTPPlugInsRec            HTTPPlugInsRec;
  248.  
  249. struct VolSpec {
  250.     Str32                             vName;                        /* pascal string because FSSpec uses pascal string*/
  251.     UInt8                             filler;
  252.     SInt16                             vRefNum;
  253.     UInt32                             vCreateDate;
  254. };
  255. typedef struct VolSpec                    VolSpec;
  256. enum {
  257.     kFSHTTPWebDirCountRecVersion = 1
  258. };
  259.  
  260.  
  261. struct HTTPWebDirCountRec {
  262.     UInt16                             count;                        /* How many HTTPWebDirRec there are */
  263.     SInt16                             version;                    /* Version of the HTTPWebDirRec */
  264. };
  265. typedef struct HTTPWebDirCountRec        HTTPWebDirCountRec;
  266. enum {
  267.     kFSWebFolderEnabled            = 1
  268. };
  269.  
  270. enum {
  271.     kFSAddressTypeDNS            = 0,
  272.     kFSAddressTypeIPAddress        = 1
  273. };
  274.  
  275.  
  276. struct HTTPWebDirRec {
  277.     UInt16                             enabled;                    /* 1 == this web folder enabled, 0 == disabled */
  278.     SInt16                             addressType;                /* Indicates how to decode addressText: 0 == DNS name, 1 = IP Address (in ASCII) */
  279.     Str63                             addressText;                /* Domain name or IP address (in ASCII) of this web folder (pascal str) See addressType field */
  280.     UInt16                             portNumber;                    /* Port number for this web folder's IP address (InetPort) */
  281.     VolSpec                         volSpec;                    /* Volume specifier */
  282.     SInt32                             dirID;                        /* Dir ID of this web folder */
  283. };
  284. typedef struct HTTPWebDirRec            HTTPWebDirRec;
  285. /*----------------------------------------------------------*/
  286. /*        Server Preference - FTP Information                    */
  287. /*----------------------------------------------------------*/
  288. enum {
  289.     kFSFTPServiceInfoVersion    = 1
  290. };
  291.  
  292.  
  293. struct FTPServiceInfo {
  294.     SInt16                             versionNumber;                /* version number for this record */
  295.     SInt16                             ftpEnable;                    /* Enable FTP, 1-enable, 0-not enable */
  296.     SInt16                             status;
  297.     SInt16                             ftpAnonymousEnable;            /* Enable Anonymous Login, 1-enable, 0-not enable */
  298. };
  299. typedef struct FTPServiceInfo            FTPServiceInfo;
  300. /*----------------------------------------------------------*/
  301. /*        Server Preference - AFP Information                    */
  302. /*----------------------------------------------------------*/
  303. enum {
  304.     kFSAFPServiceInfoVersion    = 1
  305. };
  306.  
  307.  
  308. struct AFPServiceInfo {
  309.     SInt16                             versionNumber;                /* version number for this record */
  310.     SInt16                             afpOverTCPIPEnable;            /* Enable AFP over TCPIP, 1-enable, 0-not enable */
  311.     SInt16                             afpOverTCPIPStatus;
  312.     SInt16                             afpOverATalkEnable;            /* Enable AFP over AppleTalk, 1-enable, 0-not enable */
  313. };
  314. typedef struct AFPServiceInfo            AFPServiceInfo;
  315. /*----------------------------------------------------------*/
  316. /*        Server Preference - SMB Information                    */
  317. /*----------------------------------------------------------*/
  318. enum {
  319.     kFSSMBServiceInfoVersion    = 1
  320. };
  321.  
  322. enum {
  323.     kFSSMBMaxNetBIOSnameLength    = 15,
  324.     kFSSMBMaxWorkGroupLength    = 15,
  325.     kFSSMBMaxCommentLength        = 43,
  326.     kFSSMBWINSAddressLength        = 62
  327. };
  328.  
  329.  
  330. struct SMBServiceInfo {
  331.     SInt16                             versionNumber;                /* version number for this record */
  332.     SInt16                             smbEnable;                    /* Enable SMB, 1-enable, 0-not enable */
  333.     SInt16                             status;
  334.     SInt16                             guestEnabled;                /* Whether guest allowed for SMB */
  335.     Str31                             netBIOSname;                /* Server name. Limited to 15 bytes */
  336.     Str31                             workGroup;                    /* NETBIOS group name.  Limited to 15 bytes */
  337.     Str63                             comment;                    /* ASCII comment for the server. Limited to 43 bytes */
  338.     SInt16                             winsEnabled;                /* Enable WINS, 1-enable, 0-not enable */
  339.     Str63                             winsAddress;                /* WINS IP address */
  340.  
  341. };
  342. typedef struct SMBServiceInfo            SMBServiceInfo;
  343. /*----------------------------------------------------------------------*/
  344. /*        MIME type changes - Notify server SrvrMimeTypePrefs has changed    */
  345. /*----------------------------------------------------------------------*/
  346. enum {
  347.     kFSMimeTypeChangedVersion    = 1
  348. };
  349.  
  350.  
  351. struct MimeTypeChanged {
  352.     SInt16                             version;                    /* version number for this record */
  353.     SInt32                             counter;                    /* no meaning, just for notification */
  354. };
  355. typedef struct MimeTypeChanged            MimeTypeChanged;
  356. /*----------------------------------------------------------*/
  357. /*        IPFilter Options - Advanced option for filtering IP */
  358. /*----------------------------------------------------------*/
  359. enum {
  360.     kFSIPFilterAllow            = 1
  361. };
  362.  
  363. /* Structure of individual filters */
  364.  
  365. struct IPFilterStruct {
  366.     SInt16                             allow;                        /* 0 for disallow, 1 for allow */
  367.     UInt32                             highIPBytes;
  368.     UInt32                             lowIPBytes;
  369. };
  370. typedef struct IPFilterStruct            IPFilterStruct;
  371. enum {
  372.     kFSMaxIPFilters                = 10
  373. };
  374.  
  375.  
  376. struct IPFilterInfo {
  377.     SInt16                             versionNumber;                /* version number for this record */
  378.     SInt16                             numFilters;                    /* numberOfIPFilters */
  379.     IPFilterStruct                     filters[10];
  380. };
  381. typedef struct IPFilterInfo                IPFilterInfo;
  382. /*----------------------------------------------------------*/
  383. /*        Max connection information                            */
  384. /*----------------------------------------------------------*/
  385. /*
  386.    tags for this record are type:kFSCreatorSig  and attribute:kFSMacConnextion
  387.    this value will be used if the max connection number encoded in serial number is 250
  388. */
  389. enum {
  390.     kFSServerMaxConnectionInfoVersion = 1
  391. };
  392.  
  393.  
  394. struct ServerMaxConnectionInfo {
  395.     SInt16                             version;
  396.     SInt32                             flag;                        /* reserved for future use */
  397.     SInt32                             maxConnection;
  398. };
  399. typedef struct ServerMaxConnectionInfo    ServerMaxConnectionInfo;
  400. /* ------------------------------------------------------------------------------------------------- */
  401.  
  402. #if PRAGMA_STRUCT_ALIGN
  403.     #pragma options align=reset
  404. #elif PRAGMA_STRUCT_PACKPUSH
  405.     #pragma pack(pop)
  406. #elif PRAGMA_STRUCT_PACK
  407.     #pragma pack()
  408. #endif
  409.  
  410. #ifdef PRAGMA_IMPORT_OFF
  411. #pragma import off
  412. #elif PRAGMA_IMPORT
  413. #pragma import reset
  414. #endif
  415.  
  416. #ifdef __cplusplus
  417. }
  418. #endif
  419.  
  420. #endif /* __APPLESHAREFILESERVERREGISTRY__ */
  421.  
  422.